/*
 * Package il.ac.biu.cs.grossmm.api.data
 * File NodeSet.java
 * 
 * This is a part of presence service framework API. 
 * See javadoc for more information.
 *  
 * Copyright (C) 2006 Grossmann Mark
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.

 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
 * MA  02110-1301, USA.
 */

package il.ac.biu.cs.grossmm.api.data;

/**
 * Represents a node-set of nodes of a given type within a given node type
 * 
 * @param <N>
 *            Node interface of parent node
 * @param <S>
 *            Node interface of child nodes
 *            
 * @see NodesetByInterface
 * @see NodeTypeByInterface#nodeset(Class, Class)
 * 
 * @author Mark Grossmann
 */
public interface Nodeset<N, S> {

	/**
	 * Returns the poisition index of this node-set in the list of all node-sets
	 * in the parent node interface in definition order, starting from 0.
	 * 
	 * @return the index
	 */
	public int index();

	/**
	 * Returns the nested node type
	 * 
	 * @return the nestedNodeType
	 */
	public NodeType<S> nestedNodeType();

	/**
	 * Returns the parent node type
	 * 
	 * @return the parentNodeType
	 */
	public NodeType<N> parentNodeType();
}
